<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: xilskey_utils.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilskey__utils_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">xilskey_utils.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>MODIFICATION HISTORY:</p>
<p>Ver Who Date Changes </p>
<hr/>
<p> 1.00a rpoolla 04/26/13 First release 2.00 hk 22/01/14 Corrected PL voltage checks to VCCINT and VCCAUX. CR#768077 2.1 kvn 04/01/15 Fixed warnings. CR#716453. 3.00 vns 31/07/15 Added efuse functionality for Ultrascale. 4.0 vns 10/01/15 Modified conditional compilation to support ZynqMp platform also. Added new API Xsk_Ceil Modified Xilskey_CrcCalculation() API for providing support for efuse ZynqMp also. 6.0 vns 07/07/16 Modified XilSKey_Timer_Intialise API to initialize TimerTicks to 10us. As Hardware module only takes care of programming time(5us), through software we only need to control hardware module. Modified sysmon read to 16 bit resolution as sysmon driver has modified conversion formulae to 16 bit resolution. vns 07/18/16 Initialized sysmonpsu driver and added XilSKey_ZynqMP_EfusePs_ReadSysmonVol and XilSKey_ZynqMP_EfusePs_ReadSysmonTemp functions 6.6 vns 06/06/18 Added doxygen tags 6.7 arc 01/05/19 Fixed MISRA-C violations. vns 02/09/19 Fixed buffer overflow access in <a class="el" href="xilskey__utils_8c.html#a65f56a1dfb7f9691f8e5d917057e500d" title="Converts the string into the equivalent Hex buffer. ">XilSKey_Efuse_ConvertStringToHexLE()</a> arc 25/02/19 Added asserts for pointer parameter for NULL verification Fixed Length parameter as length in bits for XilSKey_Efuse_ConvertStringToHexBE and added length validations arc 03/13/19 Added assert to validate lengths in <a class="el" href="xilskey__utils_8c.html#a82b698427d44bba130cd7c115384434f" title="Validate the key for proper characters &amp; proper length. ">XilSKey_Efuse_ValidateKey()</a> arc 03/15/19 Modified initial default status value as XST_FAILURE 6.7 psl 03/21/19 Fixed MISRA-C violation. vns 03/23/19 Fixed CRC calculation for Ultra plus arc 04/04/19 Fixed CPP warnings. 6.8 psl 06/07/19 Added doxygen tags. psl 06/25/19 Fixed Coverity warnings. psl 06/28/19 Added doxygen tags. psl 07/29/19 Fixed MISRA-C violation. vns 08/29/19 Initialized Status variables mmd 07/31/19 Avoided reconfiguration of sysmon, if it is in use 6.9 kpt 02/16/20 Fixed coverity warnings 02/27/20 Replaced XSYSMON_DEVICE_ID with XSYSMON_PSU_DEVICE_ID vns 03/18/20 Fixed Armcc compilation errors 7.0 am 10/04/20 Resolved MISRA C violations 7.1 am 11/26/20 Resolved Coverity warnings kpt 03/17/21 Corrected error code when VCCINT levels are out of range in XilSKey_ZynqMp_EfusePs_Temp_Vol_Checks 7.2 am 07/13/21 Fixed doxygen warnings 7.5 ng 07/13/23 added SDT support</p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac23b7512fa6d7680514d181ef2a51963"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#ac23b7512fa6d7680514d181ef2a51963">XilSKey_EfusePs_XAdcInit</a> (void)</td></tr>
<tr class="memdesc:ac23b7512fa6d7680514d181ef2a51963"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to initialize the XADC driver.  <a href="#ac23b7512fa6d7680514d181ef2a51963">More...</a><br/></td></tr>
<tr class="separator:ac23b7512fa6d7680514d181ef2a51963"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff812a4c70a44e09397fbf6bad6f0536"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#aff812a4c70a44e09397fbf6bad6f0536">XilSKey_EfusePs_XAdcReadTemperatureAndVoltage</a> (XSKEfusePs_XAdc *XAdcInstancePtr)</td></tr>
<tr class="memdesc:aff812a4c70a44e09397fbf6bad6f0536"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads current value of the temperature from sysmon.  <a href="#aff812a4c70a44e09397fbf6bad6f0536">More...</a><br/></td></tr>
<tr class="separator:aff812a4c70a44e09397fbf6bad6f0536"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa67d1e0eca8dccc57c20e7d69b496366"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#aa67d1e0eca8dccc57c20e7d69b496366">XilSKey_ZynqMp_EfusePs_Temp_Vol_Checks</a> (void)</td></tr>
<tr class="memdesc:aa67d1e0eca8dccc57c20e7d69b496366"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function checks temperature and voltage ranges of ZynqMP to access PS eFUSE.  <a href="#aa67d1e0eca8dccc57c20e7d69b496366">More...</a><br/></td></tr>
<tr class="separator:aa67d1e0eca8dccc57c20e7d69b496366"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f78c13955deedf337289569a5dc0387"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a3f78c13955deedf337289569a5dc0387">XilSKey_Efuse_StartTimer</a> (void)</td></tr>
<tr class="memdesc:a3f78c13955deedf337289569a5dc0387"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the global timer &amp; starts it.  <a href="#a3f78c13955deedf337289569a5dc0387">More...</a><br/></td></tr>
<tr class="separator:a3f78c13955deedf337289569a5dc0387"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5432562161e850c2e780652305b230a7"><td class="memItemLeft" align="right" valign="top">u64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a5432562161e850c2e780652305b230a7">XilSKey_Efuse_GetTime</a> (void)</td></tr>
<tr class="memdesc:a5432562161e850c2e780652305b230a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the timer ticks from start of timer to till now.  <a href="#a5432562161e850c2e780652305b230a7">More...</a><br/></td></tr>
<tr class="separator:a5432562161e850c2e780652305b230a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2eaa24ca4b7d40aab0d75804d217616"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#ab2eaa24ca4b7d40aab0d75804d217616">XilSKey_Efuse_SetTimeOut</a> (volatile u64 *t, u64 us)</td></tr>
<tr class="memdesc:ab2eaa24ca4b7d40aab0d75804d217616"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the timer ticks to wait to set the time out.  <a href="#ab2eaa24ca4b7d40aab0d75804d217616">More...</a><br/></td></tr>
<tr class="separator:ab2eaa24ca4b7d40aab0d75804d217616"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a71bd701b24852c007d5ebad8acc257"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a2a71bd701b24852c007d5ebad8acc257">XilSKey_Efuse_IsTimerExpired</a> (u64 t)</td></tr>
<tr class="memdesc:a2a71bd701b24852c007d5ebad8acc257"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the timer has been expired or not.  <a href="#a2a71bd701b24852c007d5ebad8acc257">More...</a><br/></td></tr>
<tr class="separator:a2a71bd701b24852c007d5ebad8acc257"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaeb26ca3e2bcdbf7207734864aa58af1"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#aaeb26ca3e2bcdbf7207734864aa58af1">XilSKey_Efuse_ConvertStringToHexBE</a> (const char *Str, u8 *Buf, u32 Len)</td></tr>
<tr class="memdesc:aaeb26ca3e2bcdbf7207734864aa58af1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the string into the equivalent Hex buffer.  <a href="#aaeb26ca3e2bcdbf7207734864aa58af1">More...</a><br/></td></tr>
<tr class="separator:aaeb26ca3e2bcdbf7207734864aa58af1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65f56a1dfb7f9691f8e5d917057e500d"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a65f56a1dfb7f9691f8e5d917057e500d">XilSKey_Efuse_ConvertStringToHexLE</a> (const char *Str, u8 *Buf, u32 Len)</td></tr>
<tr class="memdesc:a65f56a1dfb7f9691f8e5d917057e500d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the string into the equivalent Hex buffer.  <a href="#a65f56a1dfb7f9691f8e5d917057e500d">More...</a><br/></td></tr>
<tr class="separator:a65f56a1dfb7f9691f8e5d917057e500d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c47bf0a861cbd2a3b6287b12bd633e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a5c47bf0a861cbd2a3b6287b12bd633e5">XilSKey_EfusePs_ConvertBytesBeToLe</a> (const u8 *Be, u8 *Le, u32 Len)</td></tr>
<tr class="memdesc:a5c47bf0a861cbd2a3b6287b12bd633e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to convert the Big Endian Byte data to Little Endian Byte data For ex: 1234567890abcdef -&gt; 78563412efcdab90.  <a href="#a5c47bf0a861cbd2a3b6287b12bd633e5">More...</a><br/></td></tr>
<tr class="separator:a5c47bf0a861cbd2a3b6287b12bd633e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45d2897e5b27bd01b0b7e20ecea133af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a45d2897e5b27bd01b0b7e20ecea133af">XilSKey_Efuse_ConvertBitsToBytes</a> (const u8 *Bits, u8 *Bytes, u32 Len)</td></tr>
<tr class="memdesc:a45d2897e5b27bd01b0b7e20ecea133af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert the Bits to Bytes in Little Endian format Ex: 0x5C -&gt; {0, 0, 1, 1, 1, 0, 1, 0}.  <a href="#a45d2897e5b27bd01b0b7e20ecea133af">More...</a><br/></td></tr>
<tr class="separator:a45d2897e5b27bd01b0b7e20ecea133af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad984a6631954ca9a24d40653ef4b6cf4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#ad984a6631954ca9a24d40653ef4b6cf4">XilSKey_EfusePs_ConvertBytesToBits</a> (const u8 *Bytes, u8 *Bits, u32 Len)</td></tr>
<tr class="memdesc:ad984a6631954ca9a24d40653ef4b6cf4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert the Bytes to Bits in little endian format 0th byte is LSB, 7th byte is MSB Ex: {0, 0, 1, 1, 1, 0, 1, 0} -&gt; 0x5C.  <a href="#ad984a6631954ca9a24d40653ef4b6cf4">More...</a><br/></td></tr>
<tr class="separator:ad984a6631954ca9a24d40653ef4b6cf4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82b698427d44bba130cd7c115384434f"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a82b698427d44bba130cd7c115384434f">XilSKey_Efuse_ValidateKey</a> (const char *Key, u32 Len)</td></tr>
<tr class="memdesc:a82b698427d44bba130cd7c115384434f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate the key for proper characters &amp; proper length.  <a href="#a82b698427d44bba130cd7c115384434f">More...</a><br/></td></tr>
<tr class="separator:a82b698427d44bba130cd7c115384434f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5bc5269c52b577da90b1e88a8a161c92"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a5bc5269c52b577da90b1e88a8a161c92">XilSKey_Efuse_IsValidChar</a> (const char *c)</td></tr>
<tr class="memdesc:a5bc5269c52b577da90b1e88a8a161c92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the passed character is a valid hash key character.  <a href="#a5bc5269c52b577da90b1e88a8a161c92">More...</a><br/></td></tr>
<tr class="separator:a5bc5269c52b577da90b1e88a8a161c92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2983af8944dad03a6326987278142199"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a2983af8944dad03a6326987278142199">XilSKey_Timer_Intialise</a> (void)</td></tr>
<tr class="memdesc:a2983af8944dad03a6326987278142199"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API initializes the Timer based on platform.  <a href="#a2983af8944dad03a6326987278142199">More...</a><br/></td></tr>
<tr class="separator:a2983af8944dad03a6326987278142199"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf973666d5d2787e571a17f6c12d6cd29"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29">XilSKey_CrcCalculation</a> (const u8 *Key)</td></tr>
<tr class="memdesc:gaf973666d5d2787e571a17f6c12d6cd29"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function Calculates CRC value based on hexadecimal string passed.  <a href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29">More...</a><br/></td></tr>
<tr class="separator:gaf973666d5d2787e571a17f6c12d6cd29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37c270a53d567eed209d11b83d16cca7"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a37c270a53d567eed209d11b83d16cca7">XilSKey_RowCrcCalculation</a> (u32 PrevCRC, u32 Data, u32 Addr)</td></tr>
<tr class="memdesc:a37c270a53d567eed209d11b83d16cca7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates CRC value for each row of AES key.  <a href="#a37c270a53d567eed209d11b83d16cca7">More...</a><br/></td></tr>
<tr class="separator:a37c270a53d567eed209d11b83d16cca7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7577067134914b99bca5e54b62bd4e6f"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a7577067134914b99bca5e54b62bd4e6f">XilSKey_Efuse_ReverseHex</a> (u32 Input)</td></tr>
<tr class="memdesc:a7577067134914b99bca5e54b62bd4e6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API reverse the value.  <a href="#a7577067134914b99bca5e54b62bd4e6f">More...</a><br/></td></tr>
<tr class="separator:a7577067134914b99bca5e54b62bd4e6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0552daa4e1f376eaac1360aba6d23930"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__cmn__crc.html#ga0552daa4e1f376eaac1360aba6d23930">XilSkey_CrcCalculation_AesKey</a> (const u8 *Key)</td></tr>
<tr class="memdesc:ga0552daa4e1f376eaac1360aba6d23930"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates CRC value of the provided key.  <a href="group__xilskey__cmn__crc.html#ga0552daa4e1f376eaac1360aba6d23930">More...</a><br/></td></tr>
<tr class="separator:ga0552daa4e1f376eaac1360aba6d23930"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a82232deb8afce5110fd62446f36c26b2"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__utils_8c.html#a82232deb8afce5110fd62446f36c26b2">TimerTicksfor1000ns</a></td></tr>
<tr class="memdesc:a82232deb8afce5110fd62446f36c26b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global Variable for 10 micro secs for microblaze.  <a href="#a82232deb8afce5110fd62446f36c26b2">More...</a><br/></td></tr>
<tr class="separator:a82232deb8afce5110fd62446f36c26b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a45d2897e5b27bd01b0b7e20ecea133af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilSKey_Efuse_ConvertBitsToBytes </td>
          <td>(</td>
          <td class="paramtype">const u8 *&#160;</td>
          <td class="paramname"><em>Bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert the Bits to Bytes in Little Endian format Ex: 0x5C -&gt; {0, 0, 1, 1, 1, 0, 1, 0}. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Bits</td><td>Input Buffer. </td></tr>
    <tr><td class="paramname">Bytes</td><td>is Output buffer. </td></tr>
    <tr><td class="paramname">Len</td><td>of the input buffer in bits </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None Test Cases: Input with All Zeroes Input with All Ones Input Little Endian (General Cases ) Input Check Big Endian - False case Check for Len not a multiple of 8 Check for Len 0 Memory Bounds of buffer checking </dd></dl>
<p>Make sure the bytes array is 0'ed first.</p>
<p>Convert 8 Bit One Byte to 1 Bit 8 Bytes</p>
<p>Convert from LSB -&gt; MSB - Little Endian</p>
<p>If len is not Byte aligned</p>

<p>Referenced by <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748">XilSKey_ZynqMp_EfusePs_Write()</a>, <a class="el" href="group__xilskey__zynqmp__efuse.html#ga67de13526ea1502e25b09f80094f2246">XilSKey_ZynqMp_EfusePs_WritePufAux()</a>, <a class="el" href="group__xilskey__zynqmp__efuse.html#gaf1587f5d17256fdbca55efa1cc0eeac0">XilSKey_ZynqMp_EfusePs_WritePufChash()</a>, and <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b392432af864665cf95a540ab576388">XilSKey_ZynqMp_EfusePs_WritePufHelprData()</a>.</p>

</div>
</div>
<a class="anchor" id="aaeb26ca3e2bcdbf7207734864aa58af1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_Efuse_ConvertStringToHexBE </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>Str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts the string into the equivalent Hex buffer. </p>
<p>Function used to convert the string to Hex in Little Endian format.</p>
<pre class="fragment"> Ex: "abc123" -&gt; {0xab, 0xc1, 0x23}
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Str</td><td>is a Input String. Will support the lower and upper case values. Value should be between 0-9, a-f and A-F</td></tr>
    <tr><td class="paramname">Buf</td><td>is Output buffer. </td></tr>
    <tr><td class="paramname">Len</td><td>of the input string in bits and it should have even values </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS no errors occurred.</li>
</ul>
</dd></dl>
<ul>
<li>XST_FAILURE an error when input parameters are not valid</li>
<li>an error when input buffer has invalid values</li>
</ul>
<p>TDD Test Cases: &mdash;Initialization&mdash; Len is odd Len is zero Str is NULL Buf is NULL &mdash;Functionality&mdash; Str input with only numbers Str input with All values in A-F Str input with All values in a-f Str input with values in a-f, 0-9, A-F Str input with values in a-z, 0-9, A-Z Boundary Cases Memory Bounds of buffer checking </p>
<p>Check the parameters</p>
<p>Len has to be multiple of 2</p>
<p>Convert char to nibble</p>
<p>Convert char to nibble</p>
<p>Merge upper and lower nibble to Hex</p>
<p>Error converting Lower nibble</p>
<p>Error converting Upper nibble</p>
<p>Converted upper and lower nibbles</p>

<p>References <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aaeb512d36c05b4bcf70bef084dad4f157">XSK_EFUSEPS_ERROR_INVALID_PARAM</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa14eb0608d56293234ccabb2175f25685">XSK_EFUSEPS_ERROR_PARAMETER_NULL</a>, and <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa5a5231e00dec43e9a65815750d918240">XSK_EFUSEPS_ERROR_STRING_INVALID</a>.</p>

<p>Referenced by <a class="el" href="xilskey__bbram__example_8c.html#aa2a34496cba738813e2c992e8d15a260">XilSKey_Bbram_InitData()</a>, <a class="el" href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29">XilSKey_CrcCalculation()</a>, and <a class="el" href="xilskey__efuse__example_8c.html#ae591d283de7547921dda96ed1630dae9">XilSKey_EfusePs_InitData()</a>.</p>

</div>
</div>
<a class="anchor" id="a65f56a1dfb7f9691f8e5d917057e500d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_Efuse_ConvertStringToHexLE </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>Str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts the string into the equivalent Hex buffer. </p>
<p>Function used to convert the string to Hex in Little Endian format.</p>
<pre class="fragment"> Ex: "abc123" -&gt; {0x23, 0xc1, 0xab}
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Str</td><td>is a Input String. Will support the lower and upper case values. Value should be between 0-9, a-f and A-F</td></tr>
    <tr><td class="paramname">Buf</td><td>is Output buffer. </td></tr>
    <tr><td class="paramname">Len</td><td>of the input string in bits and it should have even values </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS no errors occurred.</li>
</ul>
</dd></dl>
<ul>
<li>XST_FAILURE an error when input parameters are not valid</li>
<li>an error when input buffer has invalid values</li>
</ul>
<p>TDD Test Cases: &mdash;Initialization&mdash; Len is odd Len is zero Str is NULL Buf is NULL &mdash;Functionality&mdash; Str input with only numbers Str input with All values in A-F Str input with All values in a-f Str input with values in a-f, 0-9, A-F Str input with values in a-z, 0-9, A-Z Boundary Cases Memory Bounds of buffer checking </p>
<p>Check the parameters</p>
<p>Len has to be multiple of 2</p>
<p>Convert char to nibble</p>
<p>Convert char to nibble</p>
<p>Merge upper and lower nibble to Hex</p>
<p>Error converting Lower nibble</p>
<p>Error converting Upper nibble</p>
<p>Converted upper and lower nibbles</p>

<p>References <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aaeb512d36c05b4bcf70bef084dad4f157">XSK_EFUSEPS_ERROR_INVALID_PARAM</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa14eb0608d56293234ccabb2175f25685">XSK_EFUSEPS_ERROR_PARAMETER_NULL</a>, and <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa5a5231e00dec43e9a65815750d918240">XSK_EFUSEPS_ERROR_STRING_INVALID</a>.</p>

<p>Referenced by <a class="el" href="xilskey__bbram__ultrascale__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>, and <a class="el" href="xilskey__efuse__example_8c.html#a862b8c5897a66fabd7bc5bb3c9b4723c">XilSKey_EfusePl_InitData()</a>.</p>

</div>
</div>
<a class="anchor" id="a5432562161e850c2e780652305b230a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u64 XilSKey_Efuse_GetTime </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the timer ticks from start of timer to till now. </p>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  t - Timer ticks lapsed till now.
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xilskey__utils_8c.html#a2a71bd701b24852c007d5ebad8acc257">XilSKey_Efuse_IsTimerExpired()</a>, and <a class="el" href="xilskey__utils_8c.html#ab2eaa24ca4b7d40aab0d75804d217616">XilSKey_Efuse_SetTimeOut()</a>.</p>

</div>
</div>
<a class="anchor" id="a2a71bd701b24852c007d5ebad8acc257"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 XilSKey_Efuse_IsTimerExpired </td>
          <td>(</td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>t</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks whether the timer has been expired or not. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>- timeout value in us</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  t_end - Returns the global timer value in case of timer expired
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xilskey__utils_8c.html#a5432562161e850c2e780652305b230a7">XilSKey_Efuse_GetTime()</a>.</p>

<p>Referenced by <a class="el" href="xilskey__jscmd_8c.html#abae9797f8dabe8fe6089a60337059572">Bbram_Init()</a>, <a class="el" href="xilskey__jscmd_8c.html#a8a1a649f81c76f0a81196ac2d6a411bc">JtagWrite()</a>, <a class="el" href="xilskey__jscmd_8c.html#ad71fe773dff0bd882d39c2936e319c63">JtagWrite_Ultrascale()</a>, and <a class="el" href="xilskey__epshw_8h.html#a2c6ad78fcde90b22766572624ce2f236">XilSKey_EfusePs_WriteEfuseBit()</a>.</p>

</div>
</div>
<a class="anchor" id="a5bc5269c52b577da90b1e88a8a161c92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_Efuse_IsValidChar </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks whether the passed character is a valid hash key character. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>- Character to check proper value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS - In case of Success XST_FAILURE - In case of Failure </dd></dl>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#a82b698427d44bba130cd7c115384434f">XilSKey_Efuse_ValidateKey()</a>.</p>

</div>
</div>
<a class="anchor" id="a7577067134914b99bca5e54b62bd4e6f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_Efuse_ReverseHex </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Input</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API reverse the value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Input</td><td>is a 32 bit variable</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reverse the given value.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xilskey__jscmd_8c.html#a81be870dc9cfe995815d14bc106473a7">JtagRead_Status_Ultrascale()</a>.</p>

</div>
</div>
<a class="anchor" id="ab2eaa24ca4b7d40aab0d75804d217616"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilSKey_Efuse_SetTimeOut </td>
          <td>(</td>
          <td class="paramtype">volatile u64 *&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64&#160;</td>
          <td class="paramname"><em>us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates the timer ticks to wait to set the time out. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">t</td><td>- timer ticks to wait to set the timeout </td></tr>
    <tr><td class="paramname">us</td><td>- Timeout period in us</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>
<p>us: time to wait in microseconds. Convert to clock ticks and add to current time.</p>

<p>References <a class="el" href="xilskey__utils_8c.html#a5432562161e850c2e780652305b230a7">XilSKey_Efuse_GetTime()</a>.</p>

<p>Referenced by <a class="el" href="xilskey__jscmd_8c.html#abae9797f8dabe8fe6089a60337059572">Bbram_Init()</a>, <a class="el" href="xilskey__jscmd_8c.html#a8a1a649f81c76f0a81196ac2d6a411bc">JtagWrite()</a>, and <a class="el" href="xilskey__epshw_8h.html#a2c6ad78fcde90b22766572624ce2f236">XilSKey_EfusePs_WriteEfuseBit()</a>.</p>

</div>
</div>
<a class="anchor" id="a3f78c13955deedf337289569a5dc0387"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilSKey_Efuse_StartTimer </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the global timer &amp; starts it. </p>
<p>Calculates the timer ticks for 1us.</p>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  None
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xilskey__jscmd_8c.html#ad71fe773dff0bd882d39c2936e319c63">JtagWrite_Ultrascale()</a>, and <a class="el" href="group__xilskey__zynq__efuse.html#ga63c6c25524196e392935e0c9c9e34825">XilSKey_EfusePs_Write()</a>.</p>

</div>
</div>
<a class="anchor" id="a82b698427d44bba130cd7c115384434f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_Efuse_ValidateKey </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>Key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validate the key for proper characters &amp; proper length. </p>
<p>Function used to validate the AES &amp; RSA key provided as input.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Key</td><td>- Hash Key </td></tr>
    <tr><td class="paramname">Len</td><td>- Valid length of key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS - In case of Success XST_FAILURE - In case of Failure </dd></dl>
<p>Make sure the key has valid length</p>
<p>Make sure the key has valid characters</p>

<p>References <a class="el" href="xilskey__utils_8c.html#a5bc5269c52b577da90b1e88a8a161c92">XilSKey_Efuse_IsValidChar()</a>, <a class="el" href="group__xilskey__plefuse__error__codes.html#gga8fd80cd0c662e8df2920d23077b48d65a3b58af699bab54e41c9411aff2ff97a5">XSK_EFUSEPL_ERROR_KEY_VALIDATION</a>, <a class="el" href="group__xilskey__plefuse__error__codes.html#gga8fd80cd0c662e8df2920d23077b48d65a64e3ef7ab118370131d6b9f37183161c">XSK_EFUSEPL_ERROR_NONE</a>, <a class="el" href="group__xilskey__plefuse__error__codes.html#gga8fd80cd0c662e8df2920d23077b48d65a4725ff919a89d8da2cf664e85cc9d6ad">XSK_EFUSEPL_ERROR_NOT_VALID_KEY_CHAR</a>, and <a class="el" href="group__xilskey__plefuse__error__codes.html#gga8fd80cd0c662e8df2920d23077b48d65ae55d28ebd5f89397eda7ba2640fa5e02">XSK_EFUSEPL_ERROR_NOT_VALID_KEY_LENGTH</a>.</p>

<p>Referenced by <a class="el" href="xilskey__efuse__example_8c.html#a862b8c5897a66fabd7bc5bb3c9b4723c">XilSKey_EfusePl_InitData()</a>, and <a class="el" href="xilskey__efuse__example_8c.html#ae591d283de7547921dda96ed1630dae9">XilSKey_EfusePs_InitData()</a>.</p>

</div>
</div>
<a class="anchor" id="a5c47bf0a861cbd2a3b6287b12bd633e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilSKey_EfusePs_ConvertBytesBeToLe </td>
          <td>(</td>
          <td class="paramtype">const u8 *&#160;</td>
          <td class="paramname"><em>Be</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Le</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to convert the Big Endian Byte data to Little Endian Byte data For ex: 1234567890abcdef -&gt; 78563412efcdab90. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Be</td><td>Big endian data </td></tr>
    <tr><td class="paramname">Le</td><td>Little endian data </td></tr>
    <tr><td class="paramname">Len</td><td>Length of data to be converted and it should be in number of words (multiple of 4 bytes) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<p>TDD Test Cases: </p>

<p>Referenced by <a class="el" href="group__xilskey__zynqmp__efuse.html#ga56fb70c1fe6c73dc49f0a4366b891efe">XilSKey_ZynqMp_EfusePs_ReadPpk0Hash()</a>, <a class="el" href="group__xilskey__zynqmp__efuse.html#ga2d6c621edaf9dc92652e650a6faceaf9">XilSKey_ZynqMp_EfusePs_ReadPpk1Hash()</a>, and <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748">XilSKey_ZynqMp_EfusePs_Write()</a>.</p>

</div>
</div>
<a class="anchor" id="ad984a6631954ca9a24d40653ef4b6cf4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilSKey_EfusePs_ConvertBytesToBits </td>
          <td>(</td>
          <td class="paramtype">const u8 *&#160;</td>
          <td class="paramname"><em>Bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>Bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert the Bytes to Bits in little endian format 0th byte is LSB, 7th byte is MSB Ex: {0, 0, 1, 1, 1, 0, 1, 0} -&gt; 0x5C. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Bytes</td><td>Input Buffer. </td></tr>
    <tr><td class="paramname">Bits</td><td>is Output buffer. </td></tr>
    <tr><td class="paramname">Len</td><td>of the input buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None Test Cases: Input with All Zeroes Input with All Ones Input Little Endian (General Cases ) Input Check Big Endian - False case Check for Len not a multiple of 8 Check for Len 0 Memory Bounds of buffer checking </dd></dl>
<p>Make sure the bits array is 0 first.</p>
<p>Convert 1 Bit 8 Bytes to 8 Bit 1 Byte</p>
<p>Store from LSB -&gt; MSB - Little Endian</p>
<p>If Len is not Byte aligned</p>

</div>
</div>
<a class="anchor" id="ac23b7512fa6d7680514d181ef2a51963"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_EfusePs_XAdcInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to initialize the XADC driver. </p>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS in case of no errors.</li>
<li>XSK_EFUSEPS_ERROR_XADC_CONFIG Error occurred with XADC config.</li>
<li>XSK_EFUSEPS_ERROR_XADC_INITIALIZE Error occurred while XADC initialization</li>
<li>XSK_EFUSEPS_ERROR_XADC_SELF_TEST Error occurred in XADC self test.</li>
</ul>
</dd></dl>
<p>TDD Cases: </p>

<p>References <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa8c89cd8b9e9c6d0779f6e5b5574aee70">XSK_EFUSEPS_ERROR_XADC_CONFIG</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aab30340b6600f1c3acf5453278ea1e179">XSK_EFUSEPS_ERROR_XADC_INITIALIZE</a>, and <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aab4aee982f881935192dde3de2a9ca432">XSK_EFUSEPS_ERROR_XADC_SELF_TEST</a>.</p>

<p>Referenced by <a class="el" href="group__xilskey__zynq__efuse.html#gaf4b1541decb6c6f85a71e95c6023e601">XilSKey_EfusePs_Read()</a>, <a class="el" href="group__xilskey__zynq__efuse.html#ga63c6c25524196e392935e0c9c9e34825">XilSKey_EfusePs_Write()</a>, and <a class="el" href="group__xilskey__zynqmp__efuse.html#gabbf6b819a248562326af345bd43947c9">XilSKey_ZynqMp_EfusePs_Init()</a>.</p>

</div>
</div>
<a class="anchor" id="aff812a4c70a44e09397fbf6bad6f0536"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilSKey_EfusePs_XAdcReadTemperatureAndVoltage </td>
          <td>(</td>
          <td class="paramtype">XSKEfusePs_XAdc *&#160;</td>
          <td class="paramname"><em>XAdcInstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function reads current value of the temperature from sysmon. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">XAdcInstancePtr</td><td>Pointer to the XSKEfusePs_XAdc.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Read temperature will be stored in XSKEfusePS_XAdc pointer's temperature This function is used to copy the min, max and current value of the temperature and voltage which are read from XADC.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">XAdcInstancePtr</td><td>Pointer to the XSKEfusePs_XAdc. User has to fill the VType to specify the type of voltage. Valid values for VType are<ul>
<li>XSK_EFUSEPS_VPINT</li>
<li>XSK_EFUSEPS_VPDRO</li>
<li>XSK_EFUSEPS_VPAUX</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>XSK_EFUSEPS_VINT</li>
<li>XSK_EFUSEPS_VAUX</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<p>TDD Cases: </p>

<p>References <a class="el" href="xilskey__jscmd_8c.html#a65f94f046816b7e5dddb8e06dcfa0db0">Jtag_Read_Sysmon()</a>.</p>

</div>
</div>
<a class="anchor" id="a37c270a53d567eed209d11b83d16cca7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_RowCrcCalculation </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>PrevCRC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates CRC value for each row of AES key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">PrevCRC</td><td>holds the prev row's CRC. </td></tr>
    <tr><td class="paramname">Data</td><td>holds the present row's key. </td></tr>
    <tr><td class="paramname">Addr</td><td>stores the current row number.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Crc of current row.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="group__xilskey__cmn__crc.html#gaf973666d5d2787e571a17f6c12d6cd29">XilSKey_CrcCalculation()</a>, and <a class="el" href="group__xilskey__cmn__crc.html#ga0552daa4e1f376eaac1360aba6d23930">XilSkey_CrcCalculation_AesKey()</a>.</p>

</div>
</div>
<a class="anchor" id="a2983af8944dad03a6326987278142199"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_Timer_Intialise </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API initializes the Timer based on platform. </p>
<dl class="section return"><dt>Returns</dt><dd>RefClk will be returned.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xilskey__utils_8c.html#a82232deb8afce5110fd62446f36c26b2">TimerTicksfor1000ns</a>.</p>

<p>Referenced by <a class="el" href="group__xilskey__zynq__efuse.html#gaf4b1541decb6c6f85a71e95c6023e601">XilSKey_EfusePs_Read()</a>, and <a class="el" href="group__xilskey__zynq__efuse.html#ga63c6c25524196e392935e0c9c9e34825">XilSKey_EfusePs_Write()</a>.</p>

</div>
</div>
<a class="anchor" id="aa67d1e0eca8dccc57c20e7d69b496366"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XilSKey_ZynqMp_EfusePs_Temp_Vol_Checks </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function checks temperature and voltage ranges of ZynqMP to access PS eFUSE. </p>
<dl class="section return"><dt>Returns</dt><dd>Error code: On failure XST_SUCCESS on Success</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function returns XST_SUCCESS if we try to access eFUSE on the Remus, as Sysmon access is not permitted on Remus. </dd></dl>
<p>Check the temperature and voltage(VCC_AUX and VCC_PINT_LP)</p>

<p>References <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa96ee07ded33dd971b232c958d1f01404">XSK_EFUSEPS_ERROR_READ_TMEPERATURE_OUT_OF_RANGE</a>, <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aa41ccfd591ae3757c9fb94a91128d27ad">XSK_EFUSEPS_ERROR_READ_VCCPAUX_VOLTAGE_OUT_OF_RANGE</a>, and <a class="el" href="group__xilskey__psefuse__error__codes.html#gga35d67e0a9db73e1fa64262f5eb8f9d6aaa580ca58db7ccbe3b75536134d9d89f3">XSK_EFUSEPS_ERROR_READ_VCCPINT_VOLTAGE_OUT_OF_RANGE</a>.</p>

<p>Referenced by <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b46f3a03d5163f08b7782f669a78748">XilSKey_ZynqMp_EfusePs_Write()</a>, <a class="el" href="group__xilskey__zynqmp__efuse.html#ga67de13526ea1502e25b09f80094f2246">XilSKey_ZynqMp_EfusePs_WritePufAux()</a>, <a class="el" href="group__xilskey__zynqmp__efuse.html#gaf1587f5d17256fdbca55efa1cc0eeac0">XilSKey_ZynqMp_EfusePs_WritePufChash()</a>, and <a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b392432af864665cf95a540ab576388">XilSKey_ZynqMp_EfusePs_WritePufHelprData()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a82232deb8afce5110fd62446f36c26b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 TimerTicksfor1000ns</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global Variable for 10 micro secs for microblaze. </p>

<p>Referenced by <a class="el" href="xilskey__jscmd_8c.html#ad71fe773dff0bd882d39c2936e319c63">JtagWrite_Ultrascale()</a>, and <a class="el" href="xilskey__utils_8c.html#a2983af8944dad03a6326987278142199">XilSKey_Timer_Intialise()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
